<template>
	<view class="menu_item" @click="toPage">
		<view class="_title">{{ title }}</view>
		<up-icon name="arrow-right" ></up-icon>
	</view>
</template>

<script setup>
import { toast } from '@/utils/common';
	const props = defineProps({
		title: String,
		page: String
	})
	
	const toPage = ()=>{
		if(!props.page){
			toast('熬夜开发中...')
			return
		}
		
		uni.navigateTo({
			url: props.page
		})
	}
</script>

<style lang="scss" scoped>
	.menu_item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 32rpx;
		border-bottom: 1rpx solid rgba(0,0,0,0.04);
		._title{
			font-weight: 400;
			font-size: 32rpx;
			color: rgba(0,0,0,0.85);
			line-height: 46rpx;
		}
	}

</style>
